-- GENERATED SPELL FOR [Brack] --


function spell0_520(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_520', 10287, 1)
end

function spell1_520(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_520', 20000, 1)
end

function spell2_520(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_520', 602, 1)
end

function Sorts_520(pUnit, Event)
local choix_sorts_520 = math.random(0, 2)
if choix_sorts_520 == 0 then
pUnit:RegisterEvent('spell0_520', 1, 1)
end
if choix_sorts_520 == 1 then
pUnit:RegisterEvent('spell1_520', 1, 1)
end
if choix_sorts_520 == 2 then
pUnit:RegisterEvent('spell2_520', 1, 1)
end
end

function mob520_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_520', math.random(1500, 3000), 1)
end

function mob520_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob520_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob520_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(520, 1, 'mob520_Action')
RegisterUnitEvent(520, 2, 'mob520_Leave')
RegisterUnitEvent(520, 3, 'mob520_Kill')
RegisterUnitEvent(520, 4, 'mob520_Die')
